import Vue from 'vue'

import App from './App.vue'
import router from './router'
import store from './store'
import plugins from './plugins' // plugins

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';


import '@/assets/styles/element-variables.scss'

import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css

import './assets/icons' // icon
import './info' // info

// 代码高亮
import hljs from 'highlight.js'
import 'highlight.js/styles/darcula.css' //样式文件

import {parseTime, formatTime} from './utils'

Vue.use(plugins)
Vue.use(ElementUI);


Vue.directive('highlight', function (el) {
  let blocks = el.querySelectorAll('pre code');
  blocks.forEach((block) => {
      hljs.highlightBlock(block)
  })
})

Vue.config.productionTip = false
Vue.filter('parseTime', (v) => parseTime(v,'{y}-{m}-{d}'))
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
